/*
* @Author: Marte
* @Date:   2016-10-25 10:58:16
* @Last Modified by:   Marte
* @Last Modified time: 2016-10-25 11:03:06
*/


'use strict';

var sequelizeService = require('../utils/sequelizeService');

sequelizeService.sequelize
  .sync()
  .then(function(){
        var model = sequelizeService.models.TypeRemark;

        var arr=[{
            TypeId:1,
            RemarkId:1
        },{
            TypeId:1,
            RemarkId:2
        },{
            TypeId:1,
            RemarkId:3
        },{
            TypeId:1,
            RemarkId:4
        },{
            TypeId:1,
            RemarkId:5
        },{
            TypeId:1,
            RemarkId:6
        },{
            TypeId:1,
            RemarkId:7
        },{
            TypeId:1,
            RemarkId:8
        },{
            TypeId:1,
            RemarkId:9
        },{
            TypeId:2,
            RemarkId:1
        },{
            TypeId:2,
            RemarkId:2
        },{
            TypeId:2,
            RemarkId:3
        },{
            TypeId:2,
            RemarkId:4
        },{
            TypeId:2,
            RemarkId:5
        },{
            TypeId:2,
            RemarkId:6
        },{
            TypeId:2,
            RemarkId:7
        },{
            TypeId:3,
            RemarkId:2
        }];

        model
      .bulkCreate(arr,{individualHooks:true})
      .then(function() {
        console.log('新增 %d 条记录', arr.length);
      })
      .error(function(err) {
        console.log(err);
      });
  });